<?php
use Illuminate\Http\Request;

const API_VERSION = 1.0;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

/**
 * 区域列表
 */
Route::get('/area/list', 'Auth\AreaController@getList');

Route::group(['prefix' => '/'], function () {
    Route::post('member/register', 'Auth\PublicController@register');//注册
    Route::post('member/login', 'Auth\PublicController@login');//登录
    Route::post('member/forget', 'Auth\PublicController@forget');//忘记密码

    Route::post('member/modifypassword', 'Auth\MemberController@modifyPassword');//修改密码
    Route::post('member/feedback', 'Auth\MemberController@feedback');//反馈
    Route::post('member/updateInfo', 'Auth\MemberController@updateInfo');//更新用户信息
    Route::post('member/userInfo', 'Auth\MemberController@userInfo');//更新用户信息

    Route::post('message/typelist', 'Auth\MessageController@typeList');//消息大类
    Route::post('message/list', 'Auth\MessageController@msgList');//消息列表
    Route::post('member/applylist', 'Auth\MineController@applyList');//消息列表

    Route::get('public/banner', 'Auth\PublicController@banner');//banner
    /**
     * 兼职
     */
    Route::post('job/list', 'Auth\PartTimeJobController@getList');//兼职实习列表
    Route::post('job/detail', 'Auth\PartTimeJobController@detail');//兼职实习详情
    Route::post('job/collect', 'Auth\MineController@collect');//收藏
    Route::post('job/collectlist', 'Auth\MineController@getCollectList');//收藏列表
    Route::post('job/apply', 'Auth\MineController@apply');//申请

    /**
     * 简历
     */
    Route::post('resume/detail', 'Auth\ResumeController@detail');//详情
    Route::post('resume/edit', 'Auth\ResumeController@edit');//编辑




});

Route::group(['prefix' => '/zh/'], function () {
    Route::post('member/register', 'Zhihu\PublicController@register');//注册
    Route::post('member/login', 'Zhihu\PublicController@login');//登录
    Route::post('member/forget', 'Zhihu\PublicController@forget');//忘记密码


    Route::get('service/list', 'Zhihu\ServiceController@getList');//服务列表
    Route::post('service/detail', 'Zhihu\ServiceController@detail');//详情

    Route::post('order/list', 'Zhihu\OrderController@getList');//订单列表
    Route::post('order/place', 'Zhihu\OrderController@place');//下单

});

Route::group(['prefix'=>'/xx/'],function (){
    Route::get('public/banner', 'Zhihu\PublicController@banner');//banner
    Route::post('food/list', 'xx\FoodController@getList');//列表
    Route::post('food/detail', 'xx\FoodController@detail');//详情
    Route::post('food/collect', 'xx\MemberController@collect');//详情
    Route::post('food/collectlist', 'xx\MemberController@getCollectList');//详情
    Route::post('food/publish', 'xx\MemberController@publish');//发布
    Route::post('food/publishlist', 'xx\MemberController@publishList');//发布


    Route::post('public/upload', 'xx\UploadController@upload');//上传文件
    Route::post('comment/list', 'xx\FoodController@commentList');//评论列表
    Route::post('comment/comment', 'xx\CommentController@comment');//评论
});